#ifndef SETTINGPWSSWDWIDGET_H
#define SETTINGPWSSWDWIDGET_H

#include <QDialog>

namespace Ui {
class SettingPwsswdWidget;
}

enum OpenType { ValidatePW = 1, ChangePW = 2 };
class SettingPwsswdWidget : public QDialog
{
    Q_OBJECT
private:
    explicit SettingPwsswdWidget(OpenType open_type,QWidget *parent = 0);

public:
    static SettingPwsswdWidget* TryNewSettingPwsswdWidget(OpenType open_type,QWidget *parent = 0);
    ~SettingPwsswdWidget();


private slots:
    void on_enter_btn_clicked();

    void on_cancel_btn_clicked();

    void on_input_passwd_lad_textChanged(const QString &input_pw);

private:
    void NoNoticeChangeInputText(QString &val);
    bool CheckCanShow(); // 调用Show之前需要查看是否可以查看

private:
    Ui::SettingPwsswdWidget *ui;
    OpenType m_open_type;
    bool m_input_str_filter;
    bool m_no_notice_flag;
};

#endif // SETTINGPWSSWDWIDGET_H
